package com.gewu.gwdev.maven

import android.os.Bundle
import android.widget.Button
import androidx.appcompat.app.AppCompatActivity
import com.gewu.gwdev.hlog.HLog

class MainActivity : AppCompatActivity() {
    val TAG:String = "MainActivity"
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_main)

        findViewById<Button>(R.id.start_print).setOnClickListener {

            Thread{
                var i:Int = 0
                for (i in 0..200){
                HLog.d(TAG, " $i---5465565--------------")
               }
            }.start()
        }



        findViewById<Button>(R.id.end_print).setOnClickListener {
            HLog.flush()
        }
    }


    override fun onBackPressed() {
        super.onBackPressed()
        HLog.flush()
    }
}